package Demo10;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 洪汤泽大帅哥
 * Date: 2024-12-19
 * Time: 23:09
 */
/* 请在这里填写答案 */
//在这里给出函数被调用进行测试的例子。例如：
public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String name=sc.next();
        Admin ad1=new Admin();
        ad1.name=name;
        String pw=sc.next();
        ad1.login(pw);
    }
}
class Admin{
    public String name;
    public String password="123456";
    public void login(String password){
        if (this.password.equals(password)){
            System.out.println("密码正确,欢迎"+name+"登录系统");
        }
        else {
            System.out.println("密码错误,"+name+"您无权登录系统");
        }
    }
}